<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<script language="javascript" src="js/PopupCalendar.js" ></script>
<script type="text/javascript">
	var oCalendarEn=new PopupCalendar("oCalendarEn");	//初始化控件时,请给出实例名称如:oCalendarEn
	oCalendarEn.Init();
	 
	var oCalendarChs=new PopupCalendar("oCalendarChs");	//初始化控件时,请给出实例名称:oCalendarChs
	oCalendarChs.weekDaySting=new Array("日","一","二","三","四","五","六");
	oCalendarChs.monthSting=new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
	oCalendarChs.oBtnTodayTitle="今天";
	oCalendarChs.oBtnCancelTitle="取消";
	oCalendarChs.Init();
</script>

<script language="javascript">
	function checkForm() {
		var startDate = document.getElementById("startDate").value;
		var endDate = document.getElementById("endDate").value;
		
		if (startDate == "请选择") {
			alert("请选择课程评价开始时间！");
			return false;
		}
		
		if (endDate == "请选择") {
			alert("请选择课程评价结束时间！");
			return false;
		}

		if (startDate > endDate) {
			alert("评价结束时间小于评价开始时间，请重新选择！");
			return false;
		}
		
		return true;
	}
</script>

<strong>课程评价时间管理页面 </strong>
<html:form action="evalPeriod.do?method=updateSave" method="post" onsubmit="return checkForm();">
<html:hidden property="id" value="${ep.id}" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;</td>
        <td style="padding-right:10px;"><div align="right"></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#c9c9c9">
      <tr>
        <td width="70%" height="22" bgcolor="#FFFFFF"><strong><span class="STYLE1">修改课程评价时间</span></strong></td>
        
      </tr>
      <tr>
        <td bgcolor="#FFFFFF">
          <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">                 
            <tr>
              <td width="30%" align="right" nowrap>当前评价开始时间：</td>
              <td width="70%"><c:if test="${empty ep}">未设置</c:if> <c:if test="${!empty ep}">${ep.startDate }</c:if></td>
            </tr>
            <tr>
              <td width="30%" align="right" nowrap>当前评价结束时间：</td>
              <td width="70%"><c:if test="${empty ep}">未设置</c:if> <c:if test="${!empty ep}">${ep.endDate }</c:if></td>
            </tr>
            <tr>
              <td width="30%" align="right" nowrap>设置评价开始时间：</td>
              <td width="70%">
              	<div align="left">
              		<html:text property="startDate" onclick="getDateString(this,oCalendarChs)" readonly="true" value="请选择" />
              	</div>
              	<span class="STYLE8">${startDateError }</span>
              </td>
            </tr>
            <tr>
              <td width="30%" align="right" nowrap>设置评价结束时间：</td>
              <td width="70%">
              	<div align="left">
              		<html:text property="endDate" onclick="getDateString(this,oCalendarChs)" readonly="true" value="请选择" />
              	</div>
              	<span class="STYLE8">${endDateError }</span></td>
            </tr>         
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td align="center">&nbsp;</td>
              <td>
              	  <html:submit value="确认修改" />&nbsp;&nbsp;&nbsp; 
              	  <html:reset value="取 消" />
              </td>
            </tr>
          </table>       
		</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="35">&nbsp;</td>
  </tr>
</table>
</html:form>
